Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 0ce3bbe The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughAdded an empty changeset file at .changeset/three-clowns-travel.md; introduced a new environment preset 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@integration/presets/envs.ts`:
- Around line 217-221: The code assumes instanceKeys.get('with-passkeys') exists
when building withPasskeys; guard that lookup first (e.g., fetch const keys =
instanceKeys.get('with-passkeys')) and only call .sk/.pk if keys is defined,
otherwise handle the missing case (throw a clear error or skip creating
withPasskeys) so setEnvVariable('private', 'CLERK_SECRET_KEY', ...) and
setEnvVariable('public', 'CLERK_PUBLISHABLE_KEY', ...) never dereference
undefined; update the block that constructs withPasskeys (the base.clone()
chain) to use the guarded keys variable and appropriate fallback or explicit
failure.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: a08dfd39-1cd4-4a9a-b973-a2baf2b57ee5
📒 Files selected for processing (4)
.changeset/three-clowns-travel.mdintegration/presets/envs.tsintegration/presets/longRunningApps.tsintegration/tests/tanstack-start/passkeys.test.ts
There was a problem hiding this comment.
♻️ Duplicate comments (1)
integration/presets/envs.ts (1)
247-251:⚠️ Potential issue | 🔴 CriticalUse
withInstanceKeysforwithPasskeysto avoid staging misconfiguration and unsafe key dereference.This block bypasses the staging-aware helper and directly dereferences
instanceKeys.get('with-passkeys'); that can crash when keys are missing, and inE2E_STAGING=1it won’t get staging PK/SK +CLERK_API_URL, so the app can be filtered out by staging readiness checks.🔧 Proposed fix
-const withPasskeys = base - .clone() - .setId('withPasskeys') - .setEnvVariable('private', 'CLERK_SECRET_KEY', instanceKeys.get('with-passkeys').sk) - .setEnvVariable('public', 'CLERK_PUBLISHABLE_KEY', instanceKeys.get('with-passkeys').pk); +const withPasskeys = withInstanceKeys( + 'with-passkeys', + base.clone().setId('withPasskeys'), +);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@integration/presets/envs.ts` around lines 247 - 251, Replace the direct dereference of instanceKeys in the withPasskeys preset with the staging-aware helper; instead of using base.clone().setEnvVariable(...) and instanceKeys.get('with-passkeys'), call the withInstanceKeys helper (using the 'with-passkeys' instance key) to produce the preset so keys and CLERK_API_URL are populated safely for staging and missing-key cases; update the withPasskeys creation to use withInstanceKeys with the same id ('withPasskeys') and avoid direct instanceKeys.get(...) access.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@integration/presets/envs.ts`:
- Around line 247-251: Replace the direct dereference of instanceKeys in the
withPasskeys preset with the staging-aware helper; instead of using
base.clone().setEnvVariable(...) and instanceKeys.get('with-passkeys'), call the
withInstanceKeys helper (using the 'with-passkeys' instance key) to produce the
preset so keys and CLERK_API_URL are populated safely for staging and
missing-key cases; update the withPasskeys creation to use withInstanceKeys with
the same id ('withPasskeys') and avoid direct instanceKeys.get(...) access.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6de8e3d1-8f1f-403d-8053-3c7a6f09754c
📒 Files selected for processing (2)
integration/presets/envs.tsintegration/presets/longRunningApps.ts
Description
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit